package com.cskaoyan.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * 把来自于配置文件中的值全部都提取到单独的类中 → 由当前类的成员变量来获得对应的值
 * 参数类 → 类名 → xxxProperties
 * @author stone
 * @date 2022/05/04 16:39
 */
@Data
@ConfigurationProperties(prefix = "cskaoyan.datasource")
public class DatasourceProperties {
    //cskaoyan.datasource.driver-class-name
    String driverClassName; // = "com.mysql.jdbc.Driver";
    String url; // = "jdbc:mysql://localhost:3306/cskaoyan_db?useUnicode=true&characterEncoding=utf-8";
    String username = "松哥"; // = "root";
    String password; // = "123456";

    String maxPool;
}
